mockseries.seasonality.period_seasonality
#
PeriodSeasonalityBase class for constraints based realistic period seasonalities.
See DailySeasonality, WeeklySeasonality, YearlySeasonality. Finest granularity for constraints and generation is microseconds. The interpolation method is PCHIP.
Arguments:
time_value_constraints
- A dict of{time: value}
constraints. The curve will pass through these points. Pass time as a timedelta in the period frame. For instance, for daily seasonality, the timedelta must be between0:00:00
and23:59:59
.utc_offset
- The offset from UTC of the time. For instance, if you give constraints with GMT-8 times in mind, passtimedelta(hours=-8)
. Default behavior considers times are passed as UTC.normalize
- transform constraints to a multiplication factor for easy use in multiplicative interactions. Eg: [5, 10, 15] --> [0.5, 1, 1.5].